home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-01-18 | 6.3 KB | 276 lines | [TEXT/POV3] |
- // Persistence of Vision RayTracer Scene description file
- // File: Magic Lamp.pov
- // Version: 3
- // Description: Arabian "Genie" style magic lamp, with smoke
- // rising into the letters "POV-Ray". This is used as the
- // splash-screen & about box graphic for POV-Ray 3.
- // Best viewed at a 2/1 ratio (e.g. 400x200)
- // Date: 950219 - Updated 970118
- // Author: Eduard Schwan
- //
-
- // ----------------------------------------------------------
- // USER FLAGS: Set to 0 to turn off, 1 to turn on
- // ----------------------------------------------------------
- #declare DO_WALL = 1
- #declare DO_SMOKE = 1
- #declare DO_LETTERS = 1
- #declare DO_LAMP = 1
- #declare DO_VIGNETTE= 0
-
-
- // ----------------------------------------------------------
- // Standard POV-Ray Includes
- // ----------------------------------------------------------
-
- #include "colors.inc" // Standard Color definitions
- #include "metals.inc" // Standard Texture definitions
-
-
- global_settings
- {
- assumed_gamma 1.0
- }
-
-
- // ----------------------------------------------------------
- // Camera
- // ----------------------------------------------------------
-
- #declare CameraPos = <0.0, 1.0, -11.0>
- camera
- {
- location CameraPos
- #if (DO_VIGNETTE=1)
- angle 40
- #else
- angle 25
- #end
- right 2*x // which way is +right <X Y Z> and aspect ratio
- look_at <0.0, 1.0, 0.0> // point center of view at this point <X Y Z>
- }
-
- // ----------------------------------------------------------
- // Lights
- // ----------------------------------------------------------
-
- // above
- light_source { 0*x color Gray30 translate < 0, 90, 10> }
- // below
- light_source { 0*x color rgb <0.0,0.1,0.3> translate < 0, -5, 0> }
- // front/above
- light_source { 0*x color Gray20 translate < 0, 30, -15> }
-
-
- // ----------------------------------------------------------
- // Vignette (Frame) around view
- // ----------------------------------------------------------
-
- #if (DO_VIGNETTE)
- #declare CylRad = 0.08
- #declare SphereRad = CylRad*2
- #declare FrameNFlash = union
- {
- // the knobby frame
- blob
- {
- threshold 0.1
-
- sphere { <-1,-0.5,0> SphereRad, 1}
- cylinder { <-1,-0.5,0> <+1,-0.5,0> CylRad, 1}
-
- sphere { <+1,-0.5,0> SphereRad, 1}
- cylinder { <+1,-0.5,0> <+1,+0.5,0> CylRad, 1}
-
- sphere { <+1,+0.5,0> SphereRad, 1}
- cylinder { <+1,+0.5,0> <-1,+0.5,0> CylRad, 1}
-
- sphere { <-1,+0.5,0> SphereRad, 1}
- cylinder { <-1,+0.5,0> <-1,-0.5,0> CylRad, 1}
-
- texture
- {
- pigment { color rgb <0.9, 0.9, 1.0> }
- // pigment { color rgb <0.5, 0.3, 0.2> }
- normal { ripples 0.3 scale 0.05 }
- finish { ambient 0.3 specular 0.4 irid { 0.3 thickness 0.2 turbulence 1 } }
- }
- }
-
- // some white flashing just outside the frame to give an outer white border
- intersection
- {
- box { <-1.3,-0.8, 0.0> <1.3,0.8,0.1> } // outer box
- box { <-1.0,-0.5,-0.1> <1.0,0.5,0.2> inverse } // inner box/hole
- // pure flat white
- texture { pigment {color rgb 1} finish {ambient 1 diffuse 0} }
- }
-
- // For some weird reason, there's a little more room on the sides
- // than on the top/bottom (even though it is exactly 2:1),
- // so we just stretch the frame out a little to fit better.
- scale <1.15, 1, 1>
- }
-
- object
- {
- FrameNFlash
- translate CameraPos+2.5*z
- }
-
- #end
-
-
- // ----------------------------------------------------------
- // Sky
- // ----------------------------------------------------------
-
- sky_sphere
- {
- pigment
- {
- gradient y
- color_map {
- /* too garish
- [0.1 red 0.8]
- [0.2 red 0.4]
- [0.4 red 0.1]
- [0.45 blue 0.2]
- [0.5 blue 0.2]
- [0.6 blue 0.5]
- [0.7 blue 1.0]
- [1.0 White]
- */
- [0.4 rgb <0.6,0.4,0.2>] // brown
- [0.45 blue 0.3]
- [0.5 blue 0.4]
- [0.6 blue 0.5]
- [0.7 rgb <0.3,0.5,0.7>]
- [1.0 White]
- }
- scale 2 translate -1*y
- }
- }
-
- // ----------------------------------------------------------
- // Back wall
- // ----------------------------------------------------------
-
- #if (DO_WALL)
- #declare Crackle_Scale = 0.8
- #declare Crackle_Turb = 0.2
- plane
- {
- z, 10
- hollow
- texture
- {
- pigment
- {
- crackle turbulence Crackle_Turb scale Crackle_Scale scale <2,1,-1>
- color_map
- {
- // [0.10 blue 0.10]
- [0.05 blue 0.15]
- [0.10 blue 0.20]
- [0.15 blue 0.30]
- // [0.25 blue 0.70]
- }
- }
- normal
- {
- crackle turbulence Crackle_Turb scale Crackle_Scale scale <2,1,-1>
- bump_size 0.8
- }
- finish { ambient 0.1 specular 0.6 }
- rotate 5*z translate -1.5*y // move it down to obscure origin seam
- }
- }
- #end
-
- // ----------------------------------------------------------
- // The Lamp
- // ----------------------------------------------------------
-
- #if (DO_LAMP)
- #declare Lamp_Texture =
- // texture { Gold_Metal }
- texture { T_Brass_4B }
-
- #include "Magic Lamp.inc"
- object
- {
- Magic_Lamp
- // rotate <-10,-10,0>
- rotate <-20,-15,0>
- translate 1*y
- }
- #end
-
-
- // ----------------------------------------------------------
- // Smoke
- // ----------------------------------------------------------
-
- #if (DO_SMOKE)
- #include "Smoke.inc"
- object { Smoke_Shape texture {Smoke_Texture} translate <-2.6, -0.7+1, 0.0> }
- #end
-
-
- // ----------------------------------------------------------
- // POV-Ray lettering
- // ----------------------------------------------------------
-
- // texture for letters
- #declare Letter_Shade = color rgb <1.00, 0.90, 0.80>
- #declare Lettering_Texture =
- texture
- {
- pigment
- {
- marble turbulence <0.4,0.2,0.4> rotate -5*z translate 0.3*x
- color_map
- {
- [0.60 Letter_Shade]
- [0.66 Gray20]
- [0.70 Letter_Shade]
- [0.75 Letter_Shade]
- [0.80 rgb <0.8, 0.7, 0.7>]
- [0.90 rgbf 1]
- [0.95 rgb <0.7, 0.8, 0.7>]
- [1.00 rgb <0.5, 0.3, 0.1>]
- }
- scale 0.15
- }
- finish { ambient 1 diffuse 0 }
- }
-
- #if (DO_LETTERS)
- #declare POVLetters_Shape =
- plane { z, 0.0 bounded_by { box{-1.1, +1.1} } }
-
- #declare POVLetters_Texture =
- texture
- {
- material_map
- {
- gif "POVLetters.gif" // the file to read (iff/gif/tga/dump/pot)
- map_type 0 // 0=planar, 1=spherical, 2=cylindrical, 5=torus
- interpolate 2 // 0=none, 1=linear, 2=bilinear, 4=normalized distance
- once
- texture { pigment {Clear} } // texture for color index # 0
- texture { Lettering_Texture } // texture for color index # 1
- } // material_map
- translate -0.5*(x+y) scale 2 // unitize
- }
-
-
- object
- {
- POVLetters_Shape texture {POVLetters_Texture}
- scale <3,1,1> translate <0, 2.2, 0>
- }
- #end
-
-